home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_kdelibs.idb / usr / freeware / kde / include / klined.h.z / klined.h
Encoding:
C/C++ Source or Header  |  1999-01-26  |  1.8 KB  |  67 lines

  1. /* This file is part of the KDE libraries
  2.     Copyright (C) 1997 Sven Radej (sven.radej@iname.com)
  3.  
  4.     This library is free software; you can redistribute it and/or
  5.     modify it under the terms of the GNU Library General Public
  6.     License as published by the Free Software Foundation; either
  7.     version 2 of the License, or (at your option) any later version.
  8.  
  9.     This library is distributed in the hope that it will be useful,
  10.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  12.     Library General Public License for more details.
  13.  
  14.     You should have received a copy of the GNU Library General Public License
  15.     along with this library; see the file COPYING.LIB.  If not, write to
  16.     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17.     Boston, MA 02111-1307, USA.
  18. */
  19. // This was taken from filentry.h
  20. // fileentry.h is part of KFM II, by Torben Weis
  21.  
  22.  
  23.  
  24. #ifndef _KLINED_H
  25. #define _KLINED_H
  26. #include <qlined.h>
  27.  
  28. /**
  29.  * This widget has the same behaviour as QLineEditor, but emits
  30.  * signals for two more key-events: @ref completion when Ctrl-D is
  31.  * pressed and  @ref rotation when Ctrl-S is pressed. This
  32.  * class is inspired by Torben Weis' fileentry.cpp for KFM II
  33.  * @short KDE Line input widget
  34.  */
  35.  
  36. class KLined : public QLineEdit
  37. {
  38.   Q_OBJECT
  39.         
  40. public:
  41.   KLined ( QWidget *_parent, const char *_name );
  42.   ~KLined ();
  43.  
  44.   /**
  45.     * This puts cursor at and of string. When using out of toolbar,
  46.     * call this in your slot connected to signal completion.
  47.     */
  48.   void cursorAtEnd();
  49.  
  50.   signals:
  51.  
  52.   /**
  53.     * Connect to this signal to receive Ctrl-D
  54.     */
  55.   void completion ();
  56.     
  57.   /**
  58.     * Connect to this signal to receive Ctrl-S
  59.     */
  60.   void rotation ();
  61.     
  62.  protected:
  63.      bool eventFilter (QObject *, QEvent *);
  64.  };
  65.  
  66. #endif
  67.